﻿<Window x:Class="Neudesic.AzureStorageExplorer.Dialogs.ViewErrorsDialog"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="View Errors"
        Width="480" Height="290"
        HorizontalAlignment="Center" VerticalAlignment="Center"
        Icon="/Images/App.ico"
        WindowStartupLocation="CenterOwner"
        ShowInTaskbar="False"
        >
    <Grid Margin="4" VerticalAlignment="Center" HorizontalAlignment="Center">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>

        <TextBlock Grid.Row="0" 
                   Margin="0,0,0,0"
                   Text="Errors: (select to view detail)" />
        
        <ListBox Grid.Row="1" 
                 Name="ExceptionListBox"
                 ItemsSource="{Binding Exceptions}"
                 Margin="0,0,0,8"
                 HorizontalAlignment="Left" VerticalAlignment="Stretch"
                 Width="450" Height="200"
                 SelectionChanged="ExceptionListBox_SelectionChanged"
                 x:FieldModifier="public"
                 >
            <ListBox.ItemTemplate>
                <DataTemplate>
                    <StackPanel Orientation="Horizontal" >
                        <TextBlock Text="{Binding Path=Message}" />
                    </StackPanel>
                </DataTemplate>
            </ListBox.ItemTemplate>
        </ListBox>

        <StackPanel Grid.Row="2" Orientation="Horizontal" >
            <Button Content="Clear Error List" IsDefault="True"
                    Margin="0,0,4,0"
                    Height="22"
                    FontFamily="Calibri" FontSize="12"
                    Template="{DynamicResource GlassButton}" Foreground="Black"                     
                    Click="Clear_Click" /> 
            <Button Content="Close" IsCancel="True" 
                    Margin="0,0,8,0"
                    Height="22"
                    FontFamily="Calibri" FontSize="12"
                    Template="{DynamicResource GlassButton}" Foreground="Black"                     
                    Click="Close_Click" />
        </StackPanel>
    </Grid>
</Window>
